package com.spdzen.model;


import com.baomidou.mybatisplus.activerecord.Model;
import java.util.Date;

import javax.validation.constraints.Min;

import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.spdzen.support.validation.AddValidGroup;
import com.spdzen.support.validation.UpdateValidGroup;
import com.baomidou.mybatisplus.annotations.TableId;
import java.io.Serializable;


/**
 * <p>
 * 系统角色
 * </p>
 *
 * @author accountwcx@qq.com
 * @since 2017-03-16
 */
@TableName("spd_sys_role")
public class SysRole extends Model<SysRole> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */

	@TableId("id")
	@Min(value = 1L, groups = {UpdateValidGroup.class})
	private Long id;
    /**
     * 角色名称
     */

	@TableField("name")
	@NotBlank(groups = {AddValidGroup.class, UpdateValidGroup.class})
	private String name;
    /**
     * 操作时间（创建/更新）
     */

	@TableField("operate_time")
	private Date operateTime;
    /**
     * 操作人id
     */

	@TableField("operate_id")
	private Long operateId;


	public Long getId() {
		return id;
	}

	public SysRole setId(Long id) {
		this.id = id;
		return this;
	}

	public String getName() {
		return name;
	}

	public SysRole setName(String name) {
		this.name = name;
		return this;
	}

	public Date getOperateTime() {
		return operateTime;
	}

	public SysRole setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
		return this;
	}

	public Long getOperateId() {
		return operateId;
	}

	public SysRole setOperateId(Long operateId) {
		this.operateId = operateId;
		return this;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}